import request from '@/utils/request'
//求当前产品的平均值
export function selectAvgByProductId(productId) {
  return request({
    url: '/carbon/productCarbonConsumables/avg/'+productId,
    method: 'get',
  })
}

//查询减排路径
export function selectEmissionPath(id) {
  return request({
    url: '/carbon/productCarbonConsumables/emission/'+id,
    method: 'get',
  })
}

export function selectEmissionPathList(data) {
  return request({
    url: '/carbon/productCarbonConsumables/emissionList',
    method: 'post',
    data: data
  })
}




//采纳按钮 汇总至“减排路径记录”
export function summaryCarbonConsumablesLog(data) {
  return request({
    url: '/carbon/productCarbonConsumables/summary',
    method: 'post',
    data: data
  })
}


// 查询产品碳足迹-产品排放行为记录列表
export function listProductCarbonConsumables(data) {
  return request({
    url: '/carbon/productCarbonConsumables/list',
    method: 'post',
    data: data
  })
}

// 查询产品碳足迹-产品排放行为记录详细
export function getProductCarbonConsumables(id) {
  return request({
    url: '/carbon/productCarbonConsumables/' + id,
    method: 'get'
  })
}

// 新增产品碳足迹-产品排放行为记录
export function addProductCarbonConsumables(data) {
  return request({
    url: '/carbon/productCarbonConsumables',
    method: 'post',
    data: data
  })
}

// 修改产品碳足迹-产品排放行为记录
export function updateProductCarbonConsumables(data) {
  return request({
    url: '/carbon/productCarbonConsumables',
    method: 'put',
    data: data
  })
}

// 删除产品碳足迹-产品排放行为记录
export function delProductCarbonConsumables(id) {
  return request({
    url: '/carbon/productCarbonConsumables/' + id,
    method: 'delete'
  })
}

// 导出产品碳足迹-产品排放行为记录
export function exportProductCarbonConsumables(query) {
  return request({
    url: '/carbon/productCarbonConsumables/export',
    method: 'get',
    params: query
  })
}
